app
.controller('btnCtrl', ['$scope', '$http', BtnController]);
function BtnController($scope, $http){
	console.log('------$scope.menuId-----', $scope.menuId);
	console.log('------$scope.buttonArr-----', $scope.buttonArr);
	
	var menuId = $scope.menuId;
	$scope.bindBtn = function(event) {
		console.log('------event-----', event);
		var datas = $scope.getSelectedRows();
		
		if(event == 'event-to-export') {
			
		}
		
		if(menuId == 17) { // 按钮监听-【历年店铺订单】
			$scope.listenMenu17(event, datas);
		} else if(menuId == 18) { // 按钮监听-【店铺日报表】
			$scope.listenMenu18(event, datas);
		} else if(menuId == 19) { // 按钮监听-【商品日报表】
			$scope.listenMenu19(event, datas);
		} else if(menuId == 20) { // 按钮监听-【】
			$scope.listenMenu20(event, datas);
		} else if(menuId == 27) { // 按钮监听-【】
			$scope.listenMenu27(event, datas);
		}else if(menuId == 28) { // 按钮监听-【】
			$scope.listenMenu28(event, datas);
		} else if(menuId == 29) { // 按钮监听-【】
			$scope.listenMenu29(event, datas);
		} else if(menuId == 30) { // 按钮监听-【】
			$scope.listenMenu30(event, datas);
		} else if(menuId == 32) { // 按钮监听-【】
			$scope.listenMenu32(event, datas);
		} else if(menuId == 37) { // 按钮监听-【】
			$scope.listenMenu37(event, datas);
		} else if(menuId == 38) { // 按钮监听-【】
			$scope.listenMenu38(event, datas);
		} else if(menuId == 41) { // 按钮监听-【】
			$scope.listenMenu41(event, datas);
		} else if(menuId == 52) { // 按钮监听-【】
			$scope.listenMenu52(event, datas);
		} else if(menuId == 53) { // 按钮监听-【】
			$scope.listenMenu53(event, datas);
		} else if(menuId == 54) { // 按钮监听-【】
			$scope.listenMenu54(event, datas);
		} else if(menuId == 57) { // 按钮监听-【】
			$scope.listenMenu57(event, datas);
		} else if(menuId == 59) { // 按钮监听-【】
			$scope.listenMenu59(event, datas);
		} else if(menuId == 63) { // 按钮监听-【】
			$scope.listenMenu63(event, datas);
		} else if(menuId == 65) { // 按钮监听-【】
			$scope.listenMenu65(event, datas);
		} else if(menuId == 66) { // 按钮监听-【】
			$scope.listenMenu66(event, datas);
		} else if(menuId == 67) { // 按钮监听-【】
			$scope.listenMenu67(event, datas);
		} else if(menuId == 70) { // 按钮监听-【】
			$scope.listenMenu70(event, datas);
		} else if(menuId == 76) { // 按钮监听-【】
			$scope.listenMenu76(event, datas);
		} else if(menuId == 85) { // 按钮监听-【】
			$scope.listenMenu85(event, datas);
		} else if(menuId == 100) { // 按钮监听-【】
			$scope.listenMenu100(event, datas);
		} else if(menuId == 102) { // 按钮监听-【】
			$scope.listenMenu102(event, datas);
		} else if(menuId == 108) { // 按钮监听-【】
			$scope.listenMenu108(event, datas);
		} else if(menuId == 109) { // 按钮监听-【】
			$scope.listenMenu109(event, datas);
		} else if(menuId == 120) { // 按钮监听-【】
			$scope.listenMenu120(event, datas);
		} else if(menuId == 122) { // 按钮监听-【】
			$scope.listenMenu122(event, datas);
		} else if(menuId == 123) { // 按钮监听-【】
			$scope.listenMenu123(event, datas);
		} else if(menuId == 124) { // 按钮监听-【】
			$scope.listenMenu124(event, datas);
		} else if(menuId == 125) { // 按钮监听-【】
			$scope.listenMenu125(event, datas);
		} else if(menuId == 126) { // 按钮监听-【】
			$scope.listenMenu126(event, datas);
		} else if(menuId == 127) { // 按钮监听-【】
			$scope.listenMenu127(event, datas);
		} else if(menuId == 128) { // 按钮监听-【】
			$scope.listenMenu128(event, datas);
		} else if(menuId == 140) { // 按钮监听-【】
			$scope.listenMenu140(event, datas);
		} else if(menuId == 141) { // 按钮监听-【】
			$scope.listenMenu141(event, datas);
		} else if(menuId == 10151) { // 按钮监听-【】
			$scope.listenMenu10151(event, datas);
		} else if(menuId == 10156) { // 按钮监听-【】
			$scope.listenMenu10156(event, datas);
		} else if(menuId == 10160) { // 按钮监听-【】
			$scope.listenMenu10160(event, datas);
		} else if(menuId == 10163) { // 按钮监听-【】
			$scope.listenMenu10163(event, datas);
		} else if(menuId == 10167) { // 按钮监听-【平台站点维护】
			$scope.listenMenu10167(event, datas);
		} else if(menuId == 10168) { // 按钮监听-【精品库】
			$scope.listenMenu10168(event, datas);
		} else if(menuId == 10171) { // 按钮监听-【】
			$scope.listenMenu10171(event, datas);
		} else if(menuId == 10180) { // 按钮监听-【】
			$scope.listenMenu10180(event, datas);
		} else if(menuId == 10182) { // 按钮监听-【组织机构管理】
			$scope.listenMenu10182(event, datas);
		} else if(menuId == 10184) { // 按钮监听-【Listing库】
			$scope.listenMenu10184(event, datas);
		} else if(menuId == 10192) { // 按钮监听-【Listing库】
			$scope.listenMenu10192(event, datas);
		} else if(menuId == 10178) { // 按钮监听-【Listing申请】
			$scope.listenMenu10178(event, datas);
		} else if(menuId == 10195) { // 按钮监听-【图标管理】
			$scope.listenMenu10195(event, datas);
		} else if(menuId == 10199) { // 按钮监听-【预约调拨单】
			$scope.listenMenu10199(event, datas);
		} else if(menuId == 10206) { // 按钮监听-【手工分配单】
			$scope.listenMenu10206(event, datas);
		} else if(menuId == 10201) { // 按钮监听-【运营人员登记】
			$scope.listenMenu10201(event, datas);
		} else if(menuId == 10207) { // 按钮监听-【预约调拨取消单】
			$scope.listenMenu10207(event, datas);
		} else if(menuId == 10219) { // 按钮监听-【邮件标签】
			$scope.listenMenu10219(event, datas);
		}else if(menuId == 10213) { // 按钮监听-【招商信息申请】
			$scope.listenMenu10213(event, datas);
		}else if(menuId == 10221) { // 按钮监听-【运营公司档案】
			$scope.listenMenu10221(event, datas);
		}else if(menuId == 10233) { // 按钮监听-【员工个税管理子表】
			$scope.listenMenu10233(event, datas);
		}else if(menuId == 10235) { // 按钮监听-【币种管理】
			$scope.listenMenu10235(event, datas);
		}else if(menuId == 10236) { // 按钮监听-【员工个税税率表】
			$scope.listenMenu10236(event, datas);
		}else if(menuId == 10237) { // 按钮监听-【岗位职级管理表】
			$scope.listenMenu10237(event, datas);
		}else if(menuId == 10241) { // 按钮监听-【考勤管理】
			$scope.listenMenu10241(event, datas);
		}else if(menuId == 10238) { // 按钮监听-【社保管理】
			$scope.listenMenu10238(event, datas);
		}else if(menuId == 10239) { // 按钮监听-【医保管理】
			$scope.listenMenu10239(event, datas);
		}else if(menuId == 10240) { // 按钮监听-【公积金管理】
			$scope.listenMenu10240(event, datas);
		}else if(menuId == 10245) { // 按钮监听-【公司信息管理】
			$scope.listenMenu10245(event, datas);
		}else if(menuId == 10246) { // 按钮监听-【合作商银行账户管理】
			$scope.listenMenu10246(event, datas);
		}else if(menuId == 10253) { // 按钮监听-【物料名称维护】
			$scope.listenMenu10253(event, datas);
		}else if(menuId == 10255) { // 按钮监听-【物料入库单】
			$scope.listenMenu10255(event, datas);
		}else if(menuId == 10256) { // 按钮监听-【物料出库单】
			$scope.listenMenu10256(event, datas);
		}else if(menuId == 10257) { // 按钮监听-【物料转移单】
			$scope.listenMenu10257(event, datas);
		}else if(menuId == 10258) { // 按钮监听-【物料借用单】
			$scope.listenMenu10258(event, datas);
		}else if(menuId == 10259) { // 按钮监听-【物料库存进出记录】
			$scope.listenMenu10259(event, datas);
		}else if(menuId == 10261) { // 按钮监听-【部门账户管理】
			$scope.listenMenu10261(event, datas);
		}else if(menuId == 10271) { // 按钮监听-【社保付款单】
			$scope.listenMenu10271(event, datas);
		}else if(menuId == 10272) { // 按钮监听-【公积金付款单】
			$scope.listenMenu10272(event, datas);
		}else if(menuId == 10273) { // 按钮监听-【个税付款单】
			$scope.listenMenu10273(event, datas);
		}else if(menuId == 10277) { // 按钮监听-【物料库存冻结记录】
			$scope.listenMenu10277(event, datas);
		}else if(menuId == 10295) { // 按钮监听-【平台维护】
			$scope.listenMenu10295(event, datas);
		}else if(menuId == 10298) { // 按钮监听-【透明计划申报】
			$scope.listenMenu10298(event, datas);
		}else if(menuId == 10299) { // 按钮监听-【平台地区维护】
			$scope.listenMenu10299(event, datas);
		}else if(menuId == 10300) { // 按钮监听-【国家信息维护】
			$scope.listenMenu10300(event, datas);
		}else if(menuId == 10301) { // 按钮监听-【平台卖家管理】
			$scope.listenMenu10301(event, datas);
		}else if(menuId == 10302) { // 按钮监听-【平台店铺管理】
			$scope.listenMenu10302(event, datas);
		}else if(menuId == 10303) { // 按钮监听-【VAT付款账户管理】
			$scope.listenMenu10303(event, datas);
		}else if(menuId == 10305) { // 按钮监听-【平台服务付款账户管理】
			$scope.listenMenu10305(event, datas);
		}else if(menuId == 10308) { // 按钮监听-【Amazon商品管理】
			$scope.listenMenu10308(event, datas);
		}else if(menuId == 10310) { // 按钮监听-【存款账户管理】
			$scope.listenMenu10310(event, datas);
		}else if(menuId == 10311) { // 按钮监听-【存款账户平台管理】
			$scope.listenMenu10311(event, datas);
		}else if(menuId == 10312) { // 按钮监听-【资金认领单】
			$scope.listenMenu10312(event, datas);
		}else if(menuId == 10317) { // 按钮监听-【万里汇账号资金】
            $scope.listenMenu10317(event, datas);
        }else if(menuId == 10319) { // 按钮监听-【万里汇货币兑换单】
			$scope.listenMenu10319(event, datas);
		}else if(menuId == 10321) { // 按钮监听-【VAT申报】
			$scope.listenMenu10321(event, datas);
		}else if(menuId == 10322) { // 按钮监听-【预付款退回申请】
			$scope.listenMenu10322(event, datas);
		}else if(menuId == 10323) { // 按钮监听-【万里汇CNY付款单】
			$scope.listenMenu10323(event, datas);
		}else if(menuId == 10325) { // 按钮监听-【C88文件管理】
			$scope.listenMenu10325(event, datas);
		}else if(menuId == 10327) { // 按钮监听-【万里汇预付款退回】
			$scope.listenMenu10327(event, datas);
		}else if(menuId == 10330) { // 按钮监听-【运营公司账户交易类型】
			$scope.listenMenu10330(event, datas);
		}else if(menuId == 10331) { // 按钮监听-【万里汇补账单】
			$scope.listenMenu10331(event, datas);
		}else if(menuId == 10333) { // 按钮监听-【预付款归集明细】
			$scope.listenMenu10333(event, datas);
		}else if(menuId == 10334) { // 按钮监听-【万里汇外币付款单】
			$scope.listenMenu10334(event, datas);
		}else if(menuId == 10335) { // 按钮监听-【万里汇预付款对账单】
			$scope.listenMenu10335(event, datas);
		}else if(menuId == 10351) { // 按钮监听-【数据库同步管理】
			$scope.listenMenu10351(event, datas);
		}else if(menuId == 10356) { // 按钮监听-【财务交易类型】
			$scope.listenMenu10356(event, datas);
		}else if(menuId == 10359) { // 按钮监听-【通告信息维护】
			$scope.listenMenu10359(event, datas);
		}else if(menuId == 10360) { // 按钮监听-【费用划拨单】
			$scope.listenMenu10360(event, datas);
		}else if(menuId == 10364) { // 按钮监听-【运营电子发票开票单】
			$scope.listenMenu10364(event, datas);
		}else if(menuId == 10365) { // 按钮监听-【运营形式发票开票单】
			$scope.listenMenu10365(event, datas);
		}else if(menuId == 10369) { // 按钮监听-【预约采购管理】
			$scope.listenMenu10369(event, datas);
		}else if(menuId == 10370) { // 按钮监听-【预约采购库】
			$scope.listenMenu10370(event, datas);
		}else if(menuId == 10371) { // 按钮监听-【采购预入库】
			$scope.listenMenu10371(event, datas);
		}else if(menuId == 10373) { // 按钮监听-【商品组装单】
			$scope.listenMenu10373(event, datas);
		}else if(menuId == 10376) { // 按钮监听-【采购入库】
			$scope.listenMenu10376(event, datas);
		}else if(menuId == 10382) { // 按钮监听-【库存管理】
			$scope.listenMenu10382(event, datas);
		}else if(menuId == 10383) { // 按钮监听-【仓库管理】
			$scope.listenMenu10383(event, datas);
		}else if(menuId == 10384) { // 按钮监听-【库区管理】
			$scope.listenMenu10384(event, datas);
		}else if(menuId == 10386) { // 按钮监听-【货位管理】
			$scope.listenMenu10386(event, datas);
		}else if(menuId == 10387) { // 按钮监听-【采购付款单】
			$scope.listenMenu10387(event, datas);
		}else if(menuId == 10388) { // 按钮监听-【发票登记单】
			$scope.listenMenu10388(event, datas);
		}else if(menuId == 10391) { // 按钮监听-【亚马逊仓库地址管理】
			$scope.listenMenu10391(event, datas);
		}
	}
	
	$scope.listenMenu17 = function(event, datas) {
		switch(event){
			case 'event-export-update':
			{
				$scope.doExport('/api/inter/tpAmazonShopOrder/export');
				break;
			}
			case 'event-to-export':
			{
				$scope.showModalLink('/web/business/tpYsbExportLog/toExport?menuId=17', '导出表格');
				break;
			}
		};
    }
    $scope.listenMenu18 = function(event, datas) {
		switch(event){
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tcoDayShop/export');
				break;
			}
		};
    }
    $scope.listenMenu19 = function(event, datas) {
    	
		switch(event){
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tpAmazonShopOrderDaily/export');
				break;
			}
		};
    }
    $scope.listenMenu20 = function(event, datas) {
    	
		switch(event){
			case 'event-to-addRunningBack':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选择一条数据');
				} else {
					$scope.showModalLink('/web/finance/tcwRunningBack/toAddRunningBack?id=' + datas[0].id, '生成费用返还单');
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.showModalLink('/web/business/tpYsbExportLog/toExport?menuId=20', '导出表格');
				break;
			}
		};
    }
    $scope.listenMenu27 = function(event, datas) {
    	
    	//t.gridObj.getConds();
		switch(event){
			case 'event-to-export'://导出
			{
				$scope.showModalLink('/web/business/tpYsbExportLog/toExport?menuId=27', '导出表格');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tpProductBasis/export');
				break;
			}
		};
    }
	$scope.listenMenu28 = function(event, datas) {
    	
		switch(event){
			case 'event-to-export'://导出
			{
				$scope.showModalLink('/web/business/tpYsbExportLog/toExport?menuId=28', '导出表格');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tpProductBasisChildNew/export');
				break;
			}
		};
    }
    $scope.listenMenu29 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add': {
				$scope.showModalLink('/web/business/tpProductXP/toAdd', '新增商品');
				break;
			}
			case 'event-to-edit': {
				if (datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if (datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tpProductXP/toEdit?id=' + datas[0].id, '修改商品');
				}
				break; 
			}
			case 'event-to-delete': {
				if (datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var _list = [];
					for (var i = 0; i < datas.length; i++) {
						_list[i] = datas[i].id;
					}
					layer.confirm('确定要删除吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							url: '/api/inter/tpProductXPdx/deleteTrue',
							data: "list=" + _list,
							type: 'POST',
							async: true,
							success: function(res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							}, error: function() {
								layer.close();
								layer.msg("删除失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {
					});
				}
				break;
			}
		};
    }
    $scope.listenMenu30 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tpProductXP/toAdd', '新增商品');
				break;
			}
			case 'event-to-edit':
			{
				if (datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if (datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tpProductXP/toEdit?id=' + datas[0].id, '修改商品');
				}
				break;
			}
			case 'event-to-delete':
			{
				if (datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var _list = [];
					for (var i = 0; i < datas.length; i++) {
						_list[i] = datas[i].id;
					}
					layer.confirm('确定要删除吗？', {
						icon: 3
					}, function() {
						layer.msg('处理中', {
							icon: 16,
							shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tpProductXPyx/deleteTrue',
							data: "list=" + _list,
							type: 'POST',
							async: true,
							success: function(res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							},
							error: function() {
								layer.close();
								layer.msg("删除失败，请稍后再试！", {
									icon: 2
								});
							}
						});
					}, function() {});
				}
				break;
			}
		};
    }
    $scope.listenMenu32 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add': {
				$scope.showModalLink('/web/business/tpProductCarefullyChosenNew/toAdd', '新增商品');
				break;
			}
		};
    },
    $scope.listenMenu37 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/sys/ysRole/toAdd', '新增角色');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/sys/ysRole/toEdit?id=' + datas[0].id, '编辑角色');
				}
				break;
			}
		};
    },
    $scope.listenMenu38 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/sys/tsUserInfo/toAdd', '新增');
				break;
			}
			case 'event-to-batch-change-org':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var ids = '';
					for(var i = 0 ;i < datas.length; i++){
						ids += datas[i].id + ',';
					}
					$scope.showModalLink('/web/sys/tsUserInfo/toBatchChangeOrg?ids=' + ids.substring(0, ids.length - 1), '批量变更组织机构');
				}
				break;
			}
		};
    },
    $scope.listenMenu41 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/flow/yspModel/toAdd', '新增流程模型');
				break;
			}
		};
    },

    $scope.listenMenu52 = function(event, datas) {
    	
		switch(event){
			case 'event-to-editOperator':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/hr/thrOperateCompanyInfo/toEditOperator?id=' + datas[0].id, '修改运营人');
				}
				break;
			}
			case 'event-to-editStatus':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/hr/thrOperateCompanyInfo/toEditStatus?id=' + datas[0].id, '修改运营状态');
				}
				break;
			}
			case 'event-to-batch-change-org':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var ids = '';
					for(var i = 0 ;i < datas.length; i++){
						ids += datas[i].id + ',';
					}
					$scope.showModalLink('/web/hr/thrOperateCompanyInfo/toBatchChangeOrg?ids=' + ids.substring(0, ids.length - 1), '批量变更组织机构');
				}
				break;
			}
		};
    },
    $scope.listenMenu53 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add': {
				$scope.showModalLink('/web/business/tpDeptUserPoint/toAdd', '新增部门员工评价');
				break; 
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tpDeptUserPoint/toDeptUserPointEditOrDetail?id=' + datas[0].id + '&type=1', '编辑');
				}
				break;
			}
		};
    },
    $scope.listenMenu54 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tpShopRegisterPhaseSet/toAdd', '新增');
				break;
			}
		};
    },

    $scope.listenMenu57 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tpShopRegisterPhaseSet/toAdd', '新增');
				break;
			}
		};
    },
    $scope.listenMenu59 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/base/tbRepeatWord/toAdd', '新增');
				break;
			}
			case 'event-to-batch-import':
			{
				$scope.showModalLink('/web/base/tbRepeatWord/toBatchImport', '批量新增');
				break;
			}
		};
    },
	$scope.listenMenu63 = function(event, datas) {
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tpShopAnalysisReportForms/export');
				break;
			}
		};
	},
	$scope.listenMenu65 = function(event, datas) {
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tpShopAnalysisReportForms/exportByCompany');
				break;
			}
		};
	},
	$scope.listenMenu66 = function(event, datas) {
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tpShopAnalysisReportForms/exportByUser');
				break;
			}
		};
	},
    $scope.listenMenu67 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/kefu/tkfKnow/toAdd', '新增角色');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/kefu/tkfKnow/toEdit?id=' + datas[0].id, '编辑角色');
				}
				break;
			}
		};
    },
    $scope.listenMenu70 = function(event, datas) {
    	
		switch(event){
			case 'event-to-flow':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/finance/tcwRunningBack/toFlow?bid=' + datas[0].pbid, '编辑');
				}
				break;
			}
			case 'event-to-add':
			{
				$scope.showModalLink('/web/finance/tcwRunningBack/toAdd', '新增');
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
						btn: ['确定', '取消']
					}, function (index) {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwRunningBack/delete',
							data: {id: row.pid},
							success: function (data) {
								if (data.code == 0) {
									reloadTableOfList();
								} else {
									alert(data.msg);
								}
							}
						});
						layer.close(index);
					});
				}
				break;
			}
			case 'event-to-flow-history':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					$scope.showModalLink('/web/flow/ysp/toAudit?bid=' + row.pbid, '流程跟踪');
				}
				break;
			}
		};
    },
    $scope.listenMenu76 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/kefu/tpGaugeMaintenance/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
            {
                if(datas.length == 0) {
                    layer.alert('尚未选中数据');
                } else if(datas.length > 1) {
                    layer.alert('只能选中一行数据');
                } else {
    				$scope.showModalLink('/web/kefu/tpGaugeMaintenance/toEdit?id=' + datas[0].id, '修改');
                }
                break;
            }
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var _list = [];
					for(var i=0;i<datas.length;i++){
						_list[i]=datas[i].id;
					}
					
					layer.confirm('确定要删除吗？', {icon: 3}, function () {
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/kefu/tpGaugeMaintenance/deleteTrue',
							data: "list="+_list,
							type: 'POST',
							async: true,
							success: function (res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							},
							error: function () {
								layer.close();
								layer.msg("删除失败，请稍后再试！", {icon: 2});
							}
						});
							
					}, function () {});
					
				}
				break;
			}
			case 'event-to-import'://主表信息导入
			{
				$scope.showModalLink('/toImport?menuId=' + 76, '批量导入');
				break;
			}
		};
    },
    $scope.listenMenu85 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/mall/tmGoods/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
            {
                if(datas.length == 0) {
                    layer.alert('尚未选中数据');
                } else if(datas.length > 1) {
                    layer.alert('只能选中一行数据');
                } else {
    				$scope.showModalLink('/web/mall/tmGoods/toEdit?id=' + datas[0].id, '修改');
                }
                break;
            }
			case 'event-to-resort':
            {
				$scope.showModalLink('/web/mall/tmGoods/toResort', '重新顺序');
                break;
            }
		};
    },
    $scope.listenMenu100 = function(event, datas) {
    	
		switch(event){
			case 'event-to-flow':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/mall/tmGiftGiven/toFlow?bid=' + datas[0].bid, '编辑');
				}
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
						btn: ['确定', '取消']
					}, function (index) {
						$.ajax({
							type: "POST",
							url: '/api/inter/tmGiftGiven/delete',
							data: {id: row.id},
							success: function (data) {
								if (data.code == 0) {
									reloadTableOfList();
								} else {
									alert(data.msg);
								}
							}
						});
						layer.close(index);
					});
				}
				break;
			}
			case 'event-to-flow-history':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					$scope.showModalLink('/web/flow/ysp/toAudit?bid=' + row.bid, '流程跟踪');
				}
				break;
			}
		};
    },
    $scope.listenMenu102 = function(event, datas) {
    	
		switch(event){
			case 'event-to-flow':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/mall/tmGiftUse/toFlow?bid=' + datas[0].bid, '编辑');
				}
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
						btn: ['确定', '取消']
					}, function (index) {
						$.ajax({
							type: "POST",
							url: '/api/inter/tmGiftUse/delete',
							data: {id: row.id},
							success: function (data) {
								if (data.code == 0) {
									reloadTableOfList();
								} else {
									alert(data.msg);
								}
							}
						});
						layer.close(index);
					});
				}
				break;
			}
			case 'event-to-flow-history':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					$scope.showModalLink('/web/flow/ysp/toAudit?bid=' + row.bid, '流程跟踪');
				}
				break;
			}
		};
    },
    $scope.listenMenu108 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add': { 
				$scope.showModalLink('/web/finance/tbPointRunningItem/toAdd', '新增');
				break; 
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/finance/tbPointRunningItem/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
						btn: ['确定', '取消']
					}, function (index) {
						$.ajax({
							type: "POST",
							url: '/api/inter/ysDict/delete',
							data: {id: row.id},
							success: function (data) {
								if (data.code == 0) {
									reloadTableOfList();
								} else {
									alert(data.msg);
								}
							}
						});
						layer.close(index);
					});
				}
				break;
			}
		};
    },
    $scope.listenMenu109 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/finance/tcwPointTransfer/toAdd', '新增');
				break;
			}
			case 'event-to-flow':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/finance/tcwPointTransfer/toFlow?bid=' + datas[0].bid, '审批');
				}
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
						btn: ['确定', '取消']
					}, function (index) {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwPointTransfer/delete',
							data: {id: row.id},
							success: function (data) {
								if (data.code == 0) {
									reloadTableOfList();
								} else {
									alert(data.msg);
								}
							}
						});
						layer.close(index);
					});
				}
				break;
			}
			case 'event-to-flow-history':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/flow/ysp/toAudit?bid=' + datas[0].pbid, '流程跟踪');
				}
				break;
			}
		};
    },
    $scope.listenMenu120 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tpShopStopPhaseSet/toAdd', '新增');
				break;
			}
		};
    },
    $scope.listenMenu122 = function(event, datas) {
    	
		switch(event){
			case 'event-to-edit':
            {
                if(datas.length == 0) {
                    layer.alert('尚未选中数据');
                } else if(datas.length > 1) {
                    layer.alert('只能选中一行数据');
                } else {
    				$scope.showModalLink('/web/sys/tbStaticConfig/toEdit?id=' + datas[0].id, '修改');
                }
                break;
            }
		};
    },
    $scope.listenMenu123 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tbBaseinfoDwmc/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tbBaseinfoDwmc/toEdit?id=' + datas[0].id, '修改');
				}
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var _list = [];
					for(var i=0;i<datas.length;i++){
						_list[i]=datas[i].id;
					}

					layer.confirm('确定要删除吗？', {icon: 3}, function () {
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tbBaseinfoDwmc/deleteTrue',
							data: "list="+_list,
							type: 'POST',
							async: true,
							success: function (res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							},
							error: function () {
								layer.close();
								layer.msg("删除失败，请稍后再试！", {icon: 2});
							}
						});

					}, function () {});

				}
				break;
			}
		};
    },
    $scope.listenMenu124 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tbBaseinfoSpyt/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tbBaseinfoSpyt/toEdit?id=' + datas[0].id, '修改');
				}
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var _list = [];
					for(var i=0;i<datas.length;i++){
						_list[i]=datas[i].id;
					}

					layer.confirm('确定要删除吗？', {icon: 3}, function () {
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tbBaseinfoSpyt/deleteTrue',
							data: "list="+_list,
							type: 'POST',
							async: true,
							success: function (res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							},
							error: function () {
								layer.close();
								layer.msg("删除失败，请稍后再试！", {icon: 2});
							}
						});

					}, function () {});

				}
				break;
			}
		};
    },
    $scope.listenMenu125 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tbBaseinfoLmwh/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tbBaseinfoLmwh/toEdit?id=' + datas[0].id, '修改');
				}
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var _list = [];
					for(var i=0;i<datas.length;i++){
						_list[i]=datas[i].id;
					}

					layer.confirm('确定要删除吗？', {icon: 3}, function () {
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tbBaseinfoLmwh/deleteTrue',
							data: "list="+_list,
							type: 'POST',
							async: true,
							success: function (res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							},
							error: function () {
								layer.close();
								layer.msg("删除失败，请稍后再试！", {icon: 2});
							}
						});

					}, function () {});

				}
				break;
			}
		};
    },
    $scope.listenMenu126 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tbBaseinfoSppl/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tbBaseinfoSppl/toEdit?id=' + datas[0].id, '修改');
				}
				break;
			}
			case 'event-to-delete':
			{
				$scope.doDelete('/api/inter/tbBaseinfoSppl/deleteTrue', datas);
				break;
			}
		};
    },
    $scope.listenMenu127 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tbBaseinfoSppm/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tbBaseinfoSppm/toEdit?id=' + datas[0].id, '修改');
				}
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				}else {
					console.log(datas[0])
					layer.confirm('确定要删除吗？', {icon: 3}, function () {
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});

						$.ajax({
							url: '/api/inter/tbBaseinfoSppm/deleteTrue',
							data: {'id':datas[0].id},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							},
							error: function () {
								layer.close();
								layer.msg("删除失败，请稍后再试！", {icon: 2});
							}
						});

					}, function () {});

				}
				break;
			}
		};
    },
    $scope.listenMenu128 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tbBaseinfoSpcz/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tbBaseinfoSpcz/toEdit?id=' + datas[0].id, '修改');
				}
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var _list = [];
					for(var i=0;i<datas.length;i++){
						_list[i]=datas[i].id;
					}

					layer.confirm('确定要删除吗？', {icon: 3}, function () {
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tbBaseinfoSpcz/deleteTrue',
							data: "list="+_list,
							type: 'POST',
							async: true,
							success: function (res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							},
							error: function () {
								layer.close();
								layer.msg("删除失败，请稍后再试！", {icon: 2});
							}
						});

					}, function () {});

				}
				break;
			}
		};
    },

    $scope.listenMenu140 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/hr/thrOperateCompanyApply/toAdd', '新增运营公司备案');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/hr/thrOperateCompanyApply/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
		};
    },
    $scope.listenMenu141 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/hr/thrOperateCompanyApply/toAdd', '新增运营公司备案');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/hr/thrOperateCompanyApply/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
		};
    },
    $scope.listenMenu10151 = function(event, datas) {
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/eKnowAi/webEKnowAiController/sceneAdd', '新增运营公司备案');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/eKnowAi/webEKnowAiController/sceneUpdate?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-del':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
						btn: ['确定', '取消']
					}, function (index) {
						var layindex= layer.load(2);
						$.ajax({
							type: "POST",
							url: '/api/inter/eKnowScene/delEKnowScene',
							data: {id: row.id},
							success: function (data) {
								layer.close(layindex);
								if (data.code=='SUCCESS') {
									layer.msg("操作成功", {icon: 1});
									setTimeout(function(){
										window.parent.location.reload();
									}, 1000);
								} else {
									alert("不好意思，系统出现问题了，请稍后重试！");
								}
							}
						});
						layer.close(index);
					});
				}
				break;
			}
		};
    },
    $scope.listenMenu10156 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/mall/tmCate/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
            {
                if(datas.length == 0) {
                    layer.alert('尚未选中数据');
                } else if(datas.length > 1) {
                    layer.alert('只能选中一行数据');
                } else {
    				$scope.showModalLink('/web/mall/tmCate/toEdit?id=' + datas[0].id, '编辑');
                }
                break;
            }
			case 'event-to-resort':
            {
				$scope.showModalLink('/web/mall/tmCate/toResort', '重新顺序');
                break;
            }
		};
    },
    $scope.listenMenu10160 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/finance/tcwPointRewardPunish/toAdd', '新增');
				break;
			}
			case 'event-to-flow':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/finance/tcwPointRewardPunish/toFlow?bid=' + datas[0].id, '审批');
				}
				break;
			}
		};
    },
    $scope.listenMenu10163 = function(event, datas) {
    	
		switch(event){
			case 'event-to-setting':
			{
				$scope.showModalLink('/web/business/tpBoutiqueDiscount/toSetting', '设置');
				break;
			}
		};
    },
	$scope.listenMenu10167 = function(event, datas) {// 平台维护
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/base/tbSite/toAdd', '新增');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/base/tbSite/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tbSite/export');
				break;
			}
		};
	},
    $scope.listenMenu10168 = function(event, datas) {
    	
		switch(event){
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('精品库(' + datas[0].code + ')', '/web/business/tpBoutique/toEdit?id=' + datas[0].id + '&code=' + datas[0].code)
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tpBoutique/export');
				break;
			}
			case 'event-to-setting':
			{
				if (datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if (datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tpBoutique/toSetting?code=' + datas[0].code, '编辑');
				}
				break; 
			}
			case 'event-to-importDetail'://站点信息导入
			{
				$scope.showModalLink('/toImport?menuId=' + 10176, '批量导入');
                break;
			}
			case 'event-to-import':// 精品库信息导入
			{
				$scope.showModalLink('/toImport?menuId=' + 10168, '批量导入');
				break;
			}
		};

    },
    $scope.listenMenu10171 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/sys/tsOperateOrg/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
            {
                if(datas.length == 0) {
                    layer.alert('尚未选中数据');
                } else if(datas.length > 1) {
                    layer.alert('只能选中一行数据');
                } else {
					//window.top.add_tab('运营机构管理 - 编辑', '/web/sys/tsOperateOrg/toEdit?id=' + datas[0].id)
					window.top.add_tab('运营机构管理 - 编辑', '/web/sys/tsOperateOrg/toEdit?id=' + datas[0].id,1);
                }
                break;
            }
		};
    },
	$scope.listenMenu10180 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				//window.top.add_tab("A+申请 - 新增","/web/business/tpAplusSq/toAdd");
				window.top.add_tab("A+申请 - 新增","/web/business/tpAplusSq/toAdd",1);
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tpAplusSq/export');
				break;
			}
		};
    },
	$scope.listenMenu10182 = function(event, datas) {
		
		switch(event){
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/sys/tsOrganizationInfo/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
		}
	},
	$scope.listenMenu10184 = function(event, datas) {
    	
		switch(event){
		case 'event-to-detail'://详情
		{
			if(datas.length == 0) {
				layer.alert('尚未选中数据');
			} else if(datas.length > 1) {
				layer.alert('只能选中一行数据');
			} else {
				window.top.add_tab('Listing库('+datas[0].code+') - 详情', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=detail")
			}
			break;
		}
		case 'event-to-operationsEdit'://运营维护
		{
			if(datas.length == 0) {
				layer.alert('尚未选中数据');
			} else if(datas.length > 1) {
				layer.alert('只能选中一行数据');
			} else {
				window.top.add_tab('Listing库('+datas[0].code+') - 运营维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=operations",1);
			}
			break;
		}
		case 'event-to-storageEdit'://仓储维护
		{
			if(datas.length == 0) {
				layer.alert('尚未选中数据');
			} else if(datas.length > 1) {
				layer.alert('只能选中一行数据');
			} else {
				window.top.add_tab('Listing库('+datas[0].code+') - 仓储维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=storage",1);
			}
			break;
		}
		case 'event-to-logisticsEdit'://物流维护
		{
			if(datas.length == 0) {
				layer.alert('尚未选中数据');
			} else if(datas.length > 1) {
				layer.alert('只能选中一行数据');
			} else {
				window.top.add_tab('Listing库('+datas[0].code+') - 物流维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=logistics",1);
				//window.top.add_tab('Listing库('+datas[0].code+') - 物流维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=logistics")
			}
			break;
		}
		case 'event-to-purchaseEdit'://采购维护
		{
			if(datas.length == 0) {
				layer.alert('尚未选中数据');
			} else if(datas.length > 1) {
				layer.alert('只能选中一行数据');
			} else {
				window.top.add_tab('Listing库('+datas[0].code+') - 采购维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=purchase",1);
				//('Listing库('+datas[0].code+') - 采购维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=purchase")
			}
			break;
		}
		case 'event-to-manageEdit'://管理维护
		{
			if(datas.length == 0) {
				layer.alert('尚未选中数据');
			} else if(datas.length > 1) {
				layer.alert('只能选中一行数据');
			} else {

				window.top.add_tab('Listing库('+datas[0].code+') - 管理维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=manage",1);
				//window.top.add_tab('Listing库('+datas[0].code+') - 管理维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=manage")
			}
			break;
		}
		case 'event-to-updateVgsbm'://批量修改运营公司编码
		{
			if(datas.length == 0) {
				layer.alert('尚未选中数据');
			} else {
				var codeList = [];
				for(var i=0;i<datas.length;i++){
					codeList.push(datas[i].code);
				}
				window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
					console.log('data =',data);
					//var _list = [data.vGsBm];
					layui.layer.msg('处理中', {
						icon: 16,
						shade: 0.01
					});
					$.ajax({
						type: "POST",
						url: '/api/inter/tpProductActive/updateVgsbm',
						data: "list="+codeList+"&vgsbm="+data.vgsbm,
						success: function (data) {
							if (data.code == 0) {
								layer.msg('修改成功！');
							} else {
								layer.msg(data.msg);
							}
							setTimeout(function(){
								layer.closeAll();
								location.reload();
							}, 3000);
						}
					});
				};
				layui.YsModal.init({modalKey: 'THR_OperateCompanyApply', colCode: 'aaaa', parentObj: window});
				break;
			}
			break;
		}
		case 'event-to-export'://导出
		{
			$scope.showModalLink('/web/business/tpYsbExportLog/toExport?menuId=10184', '导出表格');
			break;
		}
			case 'LAYTABLE_EXPORT_DATA'://生成导出数据
			{
				$scope.doExport('/api/inter/tpProductActive/export');
				break;
			}
		};
	},
	$scope.listenMenu10192 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/sys/ysGrid/toAdd', '新增');
				break;
			}
		};
	},
	$scope.listenMenu10178 = function(event, datas) {
		
		switch(event){
			case 'event-to-add':
			{
				//window.top.add_tab("Listing申请 - 新增","/web/business/tpProductActiveSq/toAdd");
				window.top.add_tab("Listing申请 - 新增","/web/business/tpProductActiveSq/toAdd",1);
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tpProductActiveSq/export');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tpProductActiveSq/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-flow':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tpProductActiveSq/toFlow?bid=' + datas[0].bid, '编辑');
				}
				break;
			}
			case 'event-to-flow-history':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/flow/ysp/toAudit?bid=' + datas[0].pbid, '流程跟踪');
				}
				break;
			}
			case 'event-to-delete':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var _list = [];
					for(var i=0;i<datas.length;i++){
						_list[i]=datas[i].id;
					}

					layer.confirm('确定要删除吗？', {icon: 3}, function () {
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tpProductActiveSq/deleteTrue',
							data: "list="+_list,
							type: 'POST',
							async: true,
							success: function (res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							},
							error: function () {
								layer.close();
								layer.msg("删除失败，请稍后再试！", {icon: 2});
							}
						});

					}, function () {});

				}
				break;
			}
		};
	},
    $scope.listenMenu10195 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/sys/ysIcon/toAdd', '新增图标');
				break;
			}
			case 'event-to-batch-import':
			{
				$scope.showModalLink('/web/sys/ysIcon/toBatchImport', '批量导入');
				break;
			}
		};
    },
	$scope.listenMenu10199 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('预约调拨单-新增', '/web/storage/tccAllocate/toAdd')
				//window.top.add_tab('预约调拨单-新增',"/web/storage/tccAllocate/toAdd",1);
				break;
			}
			case 'event-to-flow':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var bid = datas[0].bid;
					window.top.add_tab('预约调拨单编辑-' + bid, '/web/storage/tccAllocate/toFlow?bid=' + bid)
					//window.top.add_tab('预约调拨单编辑-' + bid, '/web/storage/tccAllocate/toFlow?bid=' + bid, 1);
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tccAllocate/export');
				break;
			}
		};
	},

	$scope.listenMenu10201 = function(event, datas) {
		
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab("运营人员登记 - 新增","/web/hr/thrOperateRegistration/toAdd",1);
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('运营人员登记('+datas[0].userId+') - 编辑','/web/hr/thrOperateRegistration/toEdit?bid=' + datas[0].bid,1);
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA'://导出
			{
				$scope.doExport('/api/inter/thrOperateRegistration/export');
				break;
			}

		};
	},
	$scope.listenMenu10206 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('手工分配单-新增', '/web/storage/tccDistribute/toAdd')
				break;
			}
			case 'event-to-flow':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var bid = datas[0].bid;
					window.top.add_tab('手工分配单编辑-' + bid, '/web/storage/tccDistribute/toFlow?bid=' + bid)
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tccDistribute/export');
				break;
			}
		};
	},
	$scope.listenMenu10207 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('预约调拨取消单-新增',"/web/storage/tccAllocateCancel/toAdd",1);
				break;
			}
			case 'event-to-flow':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var bid = datas[0].bid;
					window.top.add_tab('预约调拨取消单编辑-' + bid, '/web/storage/tccAllocateCancel/toFlow?bid=' + bid, 1);
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tccAllocateCancel/export');
				break;
			}
		};
	},
	$scope.listenMenu10219 = function(event, datas) {// 邮件标签
		
		switch(event){
			case 'event-to-add'://新增
			{
				$scope.showModalLink('/web/mail/mailTag/toAdd', '邮件标签 - 新增');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/mail/mailTag/toEdit?id=' + datas[0].id, '邮件标签 - 编辑');
				}
				break;
			}
		};
	},

	$scope.listenMenu10235 = function(event, datas) {// 币种管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tpAmazonShopExchangeRate/toAdd', '新增');
				break;
			}
			case 'event-to-update':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tpAmazonShopExchangeRate/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
		};
	},

	$scope.listenMenu10233 = function(event, datas) {//员工个税管理子表
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tbUserTaxManageItem/export');
				break;
			}
		};
	},
	$scope.listenMenu10213 = function(event, datas) {//招商信息申请
		
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab("招商信息申请- 新增","/web/business/thrCanvassApply/toAdd",1);
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('招商信息申请('+datas[0].bid+') - 编辑','/web/business/thrCanvassApply/toEdit?bid=' + datas[0].bid,1);
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA'://导出
			{
				$scope.doExport('/api/inter/thrCanvassApply/export');
				break;
			}

		};
	},

	$scope.listenMenu10221 = function(event, datas) {//运营公司档案
		
		switch(event){
			case 'event-to-editByOperations'://运营维护
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('运营公司档案('+datas[0].vgsbm+') - 运营维护','/web/hr/thrOperateCompanyApply/toEdit?id=' + datas[0].id+'&editType=operations',1);
				}
				break;
			}
			case 'event-to-editByMarkets'://市场维护
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('运营公司档案('+datas[0].vgsbm+') - 市场维护','/web/hr/thrOperateCompanyApply/toEdit?id=' + datas[0].id+'&editType=markets',1);
				}
				break;
			}
			case 'event-to-editByManage'://管理维护
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('运营公司档案('+datas[0].vgsbm+') - 管理维护','/web/hr/thrOperateCompanyApply/toEdit?id=' + datas[0].id+'&editType=manage',1);
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA'://导出
			{
				$scope.doExport('/api/inter/thrOperateCompanyApply/exportByArchives');
				break;
			}
		};
	},

	$scope.listenMenu10236 = function(event, datas) {//员工个税税率表
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tbUserTaxManage/export');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('员工个税管理 - 编辑', '/web/base/tbUserTaxManage/toEdit?id=' + datas[0].id, 1);
				}
				break;
			}
		};
	},
	$scope.listenMenu10237 = function(event, datas) {//岗位职级管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/hr/tbJobLevel/toAdd', '新增');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tbJobLevel/export');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('岗位职级管理 - 编辑', '/web/hr/tbJobLevel/toEdit?id=' + datas[0].id, 1);
				}
				break;
			}
		};
	},
	$scope.listenMenu10238 = function(event, datas) {//社保管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/hr/tbSocialSecurity/toAdd', '新增');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tbSocialSecurity/export');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('社保管理 - 编辑', '/web/hr/tbSocialSecurity/toEdit?id=' + datas[0].id, 1);
				}
				break;
			}
		};
	},
	$scope.listenMenu10239 = function(event, datas) {//医保管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/hr/tbMedicalInsurance/toAdd', '新增');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tbMedicalInsurance/export');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('医保管理 - 编辑', '/web/hr/tbMedicalInsurance/toEdit?id=' + datas[0].id, 1);
				}
				break;
			}
		};
	},
	$scope.listenMenu10240 = function(event, datas) {//公积金管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/hr/tbProvidentFund/toAdd', '新增');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tbProvidentFund/export');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('公积金管理 - 编辑', '/web/hr/tbProvidentFund/toEdit?id=' + datas[0].id, 1);
				}
				break;
			}
		};
	},
	$scope.listenMenu10241 = function(event, datas) {//考勤管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/hr/tbAttendance/toAdd', '新增');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tbAttendance/export');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('岗位职级管理 - 编辑', '/web/hr/tbAttendance/toEdit?id=' + datas[0].id, 1);
				}
				break;
			}
		};
	},

	$scope.listenMenu10245 = function(event, datas) {//公司信息管理
		
		switch(event){
			case 'event-to-update'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('公司信息管理 - 编辑','/web/sys/tbCompanyInfo/toEdit?id=' +  datas[0].id,1);
				}
				break;
			}
		};
	},
	$scope.listenMenu10246 = function(event, datas) {// 合作商银行账户管理
		
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('合作商银行账户管理 - 新增', '/web/account/tcwPartnerBankInfo/toAdd', 1);
				break;
			}
			case 'event-to-update':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('合作商银行账户管理 - 编辑','/web/account/tcwPartnerBankInfo/toEdit?id=' +  datas[0].id,1);
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tcwPartnerBankInfo/export');
				break;
			}
		};
	},

	$scope.listenMenu10253 = function(event, datas) {//物料名称维护
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/hr/tbMaterial/toAdd', '新增');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/hr/tbMaterial/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tbMaterial/export');
				break;
			}
		};
	},
	$scope.listenMenu10255 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('物料入库单-新增',"/web/hr/twlStockIn/toAdd",1);
				break;
			}
			case 'event-to-export':
			{
				$.ajax({
					type: "POST",
					url: '/api/inter/twlStockIn/export',

					data: t.c.gridObj.getConds(2),
					success: function (data) {
						if (data.code == 0) {
							if(data.msg != undefined && data.msg.startsWith('http')) {
								window.open(data.msg);
							} else {
								layer.msg(data.msg);
							}
						} else {
							alert(data.msg);
						}
					}
				});
				break;
			}
		};
	},
	$scope.listenMenu10256 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('物料出库单-新增',"/web/hr/twlStockOut/toAdd",1);
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/twlStockOut/export');
				break;
			}
		};
	},
	$scope.listenMenu10257 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('物料转移单-新增',"/web/hr/twlStockTransfer/toAdd",1);
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/twlStockTransfer/export');
				break;
			}
		};
	},
	$scope.listenMenu10258 = function(event, datas) {
    	
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('物料借用单-新增',"/web/hr/twlStockBorrow/toAdd",1);
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/twlStockBorrow/export');
				break;
			}
		};
	},
	$scope.listenMenu10259 = function(event, datas) {
    	
		switch(event){
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/twlStockRunning/export');
				break;
			}
		};
	},
	$scope.listenMenu10261 = function(event, datas) {//部门账户管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tsOrganizationAccount/toAdd', '新增');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tsOrganizationAccount/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
		};
	},
	$scope.listenMenu10271 = function(event, datas) {//社保付款单
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tbSocialSecurityPay/export');
				break;
			}
			case 'event-to-add':
			{
				window.top.add_tab("社保付款单 - 新增","/web/base/tbSocialSecurityPay/toAdd",1);
				break;
			}
			case 'LAYTABLE_EXPORT_DATA_DY':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.doExport('/api/inter/tbSocialSecurityPay/exportdy?bid=' + datas[0].bid);
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA_DYMX':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.doExport('/api/inter/tbSocialSecurityPay/exportdymx?bid=' + datas[0].bid);
				}
				break;
			}
		};
	},
	$scope.listenMenu10272 = function(event, datas) {//公积金付款单
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tbReservedPay/export');
				break;
			}
			case 'event-to-add':
			{
				window.top.add_tab("公积金付款单 - 新增","/web/base/tbReservedPay/toAdd",1);
				break;
			}
			case 'LAYTABLE_EXPORT_DATA_DY':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.doExport('/api/inter/tbReservedPay/exportdy?bid=' + datas[0].bid);
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA_DYMX':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.doExport('/api/inter/tbReservedPay/exportdymx?bid=' + datas[0].bid);
				}
				break;
			}
		};
	},
	$scope.listenMenu10273 = function(event, datas) {//个税付款单
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tbIncomePay/export');
				break;
			}
			case 'event-to-add':
			{
				window.top.add_tab("个税付款单 - 新增","/web/base/tbIncomePay/toAdd",1);
				break;
			}
			case 'LAYTABLE_EXPORT_DATA_DY':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.doExport('/api/inter/tbIncomePay/exportdy?bid=' + datas[0].bid);
				}
				break;
			}
		};
	},

	$scope.listenMenu10277 = function(event, datas) {
    	
		switch(event){
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/twlStockFrozenRunning/export');
				break;
			}
		};
	},




	$scope.listenMenu10295 = function(event, datas) {// 平台维护
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/base/tbPlatform/toAdd', '新增');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/base/tbPlatform/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tbPlatform/export');
				break;
			}
		};
	},

	$scope.listenMenu10298 = function(event, datas) {//透明计划申报
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/thrTransparencyProgram/export');
				break;
			}
			case 'event-to-add':
			{
				window.top.add_tab("透明计划申报 - 新增","/web/hr/thrTransparencyProgram/toAdd",1);
				break;
			}

			case 'event-to-cancel':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					layui.layer.confirm("作废后不可恢复，确定作废？",{
						btn: ['确定', '取消']
					}, function (index) {
						$.ajax({
							type: "POST",
							url: '/api/inter/thrTransparencyProgram/cancel',
							data: {bid: row.bid,id: row.transparencyProgramId},
							success: function (data) {
								if (data.code == 0) {
									location.reload();
								} else {
									alert(data.msg);
								}
							}
						});
						layer.close(index);
					});
				}
				break;
			}
		};
	},
	$scope.listenMenu10299 = function(event, datas) {// 平台维护
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/base/tpAmazonRegion/toAdd', '新增');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/base/tpAmazonRegion/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tpAmazonRegion/export');
				break;
			}
		};
	},
	$scope.listenMenu10300 = function(event, datas) {// 平台维护
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/base/tbCountry/toAdd', '新增');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/base/tbCountry/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tbCountry/export');
				break;
			}
		};
	},
	$scope.listenMenu10301 = function(event, datas) {// 平台卖家管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tpAmazonSeller/toAdd', '新增');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tpAmazonSeller/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tpAmazonSeller/export');
				break;
			}
		};
	},
	$scope.listenMenu10302 = function(event, datas) {// 平台店铺管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tpAmazonShop/toAdd', '新增');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tpAmazonShop/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tpAmazonShop/export');
				break;
			}
			case 'event-to-auth-amazon-seller':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {

					$http.post('/api/inter/tpAmazonShop/getAmazonAuthUrl', {}, {params: {shopId: datas[0].id}})
					.success(function (response) {
						if(response.code == 0) {
							if(response.msg != undefined && response.msg.startsWith('http')) {
								window.open(response.msg);
							} else {
								layer.msg(response.msg);
							}
						} else {
							alert(response.msg);
						}
					});
				}
				break;
			}
			case 'event-to-auth-amazon-advert':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$http.post('/api/inter/tpAmazonShop/getAmazonAuthUrlGg', {}, {params: {shopId: datas[0].id}})
					.success(function (response) {
						if(response.code == 0) {
							if(response.msg != undefined && response.msg.startsWith('http')) {
								window.open(response.msg);
							} else {
								layer.msg(response.msg);
							}
						} else {
							alert(response.msg);
						}
					});
				}
				break;
			}
		};
	},
	$scope.listenMenu10303 = function(event, datas) {// VAT付款账户管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tcwVatPaymentAccount/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tcwVatPaymentAccount/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
		};
	},
	$scope.listenMenu10305 = function(event, datas) {// 平台服务付款账户管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tbPlatformServicePayAccount/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tbPlatformServicePayAccount/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
		};
	},


	$scope.listenMenu10308 = function(event, datas) {//Amazon商品管理
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tpAmazonShopProduct/export');
				break;
			}
			case 'event-to-manua':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var _list = [];
					for(var i=0;i<datas.length;i++){
						_list[i]=datas[i].id;
					}
					layer.confirm('确定要手动获取？', {icon: 3}, function () {
						var indexOfLoading = layer.load(1, {shade: [0.5,'#000000']});

						$http.post('/api/inter/tpAmazonShopProduct/manua?list='+_list, {}, {params: {}})
						.success(function (response) {
							if(response.code == 0) {
								console.log(response);
								layer.close();
								location.reload();
							}
						});
					}, function () {});
				}
				break;
				break;
			}
		};
	},

	$scope.listenMenu10310 = function(event, datas) {//存款账户管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/finance/tcwDepositPlatform/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/finance/tcwDepositPlatform/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA'://导出
			{
				$scope.doExport('/api/inter/tcwDepositPlatform/export');
				break;
			}
		};
	},

	$scope.listenMenu10311 = function(event, datas) {//存款账户平台管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/finance/tcwDepositPlatformAccount/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/finance/tcwDepositPlatformAccount/toEdit?code=' + datas[0].code, '编辑');
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA'://导出
			{
				$scope.doExport('/api/inter/tcwDepositPlatformAccount/export');
				break;
			}
		};
	},

	$scope.listenMenu10312 = function(event, datas) {// 资金认领单
		
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab("资金认领单 - 新增","/web/finance/tcwCapitalClaim/toAdd",1);
				break;
			}
			case 'LAYTABLE_EXPORT_DATA'://导出
			{
				$scope.doExport('/api/inter/tcwCapitalClaim/export');
				break;
			}
		};
	},

	$scope.listenMenu10319 = function(event, datas) {//万里汇货币兑换单
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tcwWanliCurrencyExchange/export');
				break;
			}
			case 'event-to-add':
			{
				window.top.add_tab("万里汇货币兑换单 - 新增","/web/finance/tcwWanliCurrencyExchange/toAdd",1);
				break;
			}
		};
	},

    $scope.listenMenu10317 = function(event, datas) {// 万里汇账号资金
        
        switch(event){
            case 'event-to-add':
            {
                window.top.add_tab("万里汇账号资金 - 新增","/web/finance/tcwWanliFinance/toAdd",1);
                break;
            }
            case 'event-to-edit':
            {
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab("万里汇账号资金 - 编辑","/web/finance/tcwWanliFinance/toEdit?id="+ datas[0].id,1);
				}
				break;
            }
            case 'LAYTABLE_EXPORT_DATA'://导出
            {
				$scope.doExport('/api/inter/tcwWanliFinance/export');
                break;
            }
            case 'event-to-reconciliation'://资金对账
            {
				layer.confirm('确定要资金对账吗？', { icon: 3 }, function() {
					layer.msg('处理中', { icon: 16, shade: 0.01 });

					$http.post('/api/inter/tcwWanliFinance/reconciliation', {}, {params: {}})
					.success(function (response) {
						if(response.code == 0) {
							layer.close();
							location.reload();
							layer.msg(res.msg);
						}
					});
				}, function() {
				});
                break;
            }
        };
    },


	$scope.listenMenu10321 = function(event, datas) { // VAT申报
		
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab("VAT申报 - 新增","/web/hr/thrVatApply/toAdd",1);
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/thrVatApply/export');
				break;
			}
			case 'event-to-cancel':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var row = datas[0];
					layui.layer.confirm("作废后不可恢复，确定作废？",{
						btn: ['确定', '取消']
					}, function (index) {
						$.ajax({
							type: "POST",
							url: '/api/inter/thrVatApply/cancel',
							data: {bid: row.bid},
							success: function (data) {
								if (data.code == 0) {
									reloadTableOfList();
								} else {
									alert(data.msg);
								}
							}
						});
						layer.close(index);
					});
				}
				break;
			}
		};
	},
	$scope.listenMenu10322 = function(event, datas) {//预付款退回申请
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tcwPaymentReturn/export');
				break;
			}
			case 'event-to-add':
			{
				window.top.add_tab("预付款退回申请 - 新增","/web/finance/tcwPaymentReturn/toAdd",1);
				break;
			}
			case 'LAYTABLE_EXPORT_DATA_DY':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.doExport('/api/inter/tcwPaymentReturn/exportdy?bid=' + datas[0].bid);
				}
				break;
			}
		};
	},

	$scope.listenMenu10323 = function(event, datas) { // 万里汇CNY付款单
		
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab("万里汇CNY付款单 - 新增","/web/finance/tcwWanliCnyPayment/toAdd",1);
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tcwWanliCnyPayment/export');
				break;
			}
			case 'event-to-exportdy':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.doExport('/api/inter/tcwWanliCnyPayment/exportdy?bid=' + datas[0].bid);
				}
				break;
			}
		};
	},

	$scope.listenMenu10325 = function(event, datas) { // C88文件管理
		
		switch(event){
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tsFilesInfo/export');
				break;
			}
		};
	},

	$scope.listenMenu10327 = function(event, datas) {//万里汇预付款退回
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tcwWanliPaymentReturn/export');
				break;
			}
			case 'event-to-add':
			{
				window.top.add_tab("万里汇预付款退回 - 新增","/web/finance/tcwWanliPaymentReturn/toAdd",1);
				break;
			}
			case 'LAYTABLE_EXPORT_DATA_DY':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.doExport('/api/inter/tcwWanliPaymentReturn/exportdy?bid=' + datas[0].bid);
				}
				break;
			}
		};
	},
	$scope.listenMenu10330 = function(event, datas) {//存款账户平台管理
		
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/business/tbBaseInfo/toAdd', '新增');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/business/tbBaseInfo/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA'://导出
			{
				$scope.doExport('/api/inter/tbBaseInfo/export');
				break;
			}
		};
	},
	$scope.listenMenu10331 = function(event, datas) {
		
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('万里汇补账单-新增',"/web/finance/tcwWanliSupplementary/toAdd",1);
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tcwWanliSupplementary/export');
				break;
			}
		};
	},


	$scope.listenMenu10333 = function(event, datas) {//预付款归集明细
		
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tcwWanliPrepaymentPooling/export');
				break;
			}
			case 'event-to-add':
			{
				layer.confirm('确定要新数据导入吗？', { icon: 3 }, function() {
					layer.msg('处理中', { icon: 16, shade: 0.01 });
					$.ajax({
						url: '/api/inter/tcwWanliPrepaymentPooling/add',
						data: {},
						type: 'POST',
						async: true,
						success: function(res) {
							layer.close();
							location.reload();
							layer.msg(res.msg);
						}, error: function() {
							layer.close();
							layer.msg("新数据导入失败，请稍后再试！", { icon: 2 });
						}
					});
				}, function() {
				});
				break;
			}
			case 'event-to-tb':
			{
				if (datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var _list = [];
					for (var i = 0; i < datas.length; i++) {
						_list[i] = datas[i].id;
					}
					layer.confirm('确定要同步运营公司吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							url: '/api/inter/tcwWanliPrepaymentPooling/tbVgsbm',
							data: "list=" + _list,
							type: 'POST',
							async: true,
							success: function(res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							}, error: function() {
								layer.close();
								layer.msg("同步运营公司，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {
					});
				}
				break;
			}
		};
	},

	$scope.listenMenu10334 = function(event, datas) { // 万里汇外币付款单
		
		switch(event){
			case 'event-to-add-tmjh':
			{
				window.top.add_tab("万里汇外币付款单 - 新增","/web/finance/tcwWanliOtherPayment/toAdd?payType=1");
				break;
			}
			case 'event-to-add-vat':
			{
				window.top.add_tab("万里汇外币付款单 - 新增","/web/finance/tcwWanliOtherPayment/toAdd?payType=2");
				break;
			}
			case 'event-to-add-other':
			{
				window.top.add_tab("万里汇外币付款单 - 新增","/web/finance/tcwWanliOtherPayment/toAdd?payType=3");
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tcwWanliOtherPayment/export');
				break;
			}
			case 'event-to-exportdy':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.doExport('/api/inter/tcwWanliOtherPayment/exportdy?bid=' + datas[0].bid);
				}
				break;
			}
			// 批量修改费率
			case 'event-to-batchEditExchangeRate':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var bids = '';
					for(var i = 0 ;i < datas.length; i++){
						bids += '\'' + datas[i].bid + '\',';
					}
					$scope.showModalLink('/web/finance/tcwWanliOtherPayment/toBatchEditExchangeRate?bids=' + bids.substring(0, bids.length - 1), '批量修改计算汇率');
				}
				break;
			}
			// 生成流水
			case 'event-to-generateRunning':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var bids = '';
					for(var i = 0 ;i < datas.length; i++){
						bids += datas[i].bid + ',';
					}
					layer.confirm('确定要生成流水吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							url: '/api/inter/tcwWanliOtherPayment/generateRunning',
							data: {
								bids: bids.substring(0, bids.length - 1)
							},
							type: 'POST',
							async: true,
							success: function(res) {
								layer.msg(res.msg);
								setTimeout(function(){
									location.reload();
								}, 1000);
							}, error: function() {
								layer.close();
								layer.msg("删除失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {
					});
				}
				break;
			}
		};
	},

	$scope.listenMenu10335 = function(event, datas) { // 万里汇预付款对账单
		
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab("万里汇预付款对账单 - 新增","/web/finance/tcwWanliReconciliation/toAdd", 1);
				break;
			}
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tcwWanliReconciliation/export');
				break;
			}
		};
	},


	$scope.listenMenu10351 = function(event, datas) {// 数据库同步管理
		
		switch(event) {
			case 'event-to-syn': {
				layer.open({
					shadeClose:true,
					title: '选择同步类型',
					content: `
						<form class="layui-form">
						  <div class="layui-form-item">
							<select id="id_select_type" lay-filter="id_select_type">
								<option value="1" selected="">同步菜单</option>
								<option value="2">同步字段</option>
								<option value="3">同步按钮</option>
								<option value="4">同步子列表</option>
								<option value="5">同步子列表字段</option>
								<option value="6">同步子列表按钮</option>
								<option value="7">同步弹出框</option>
								<option value="8">同步弹出框字段</option>
								<option value="9">同步流程-模型</option>
								<option value="10">同步流程-定义</option>
								<option value="11">同步流程-连接线</option>
								<option value="12">同步流程-节点</option>
								<option value="13">同步流程-部署</option>
								<option value="14">同步数据字典</option>
								<option value="15">同步行单击字段</option>
							  </select>
						  </div>
						</form>`,
					success: function(layero, index) {
						layui.form.render();
						layero.find('.layui-layer-content').css('overflow', 'unset');
					},
					yes: function (index, layero) {
						var type = $('#id_select_type').val();
						layer.confirm('确定要同步吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								type: "POST",
								url: '/api/inter/ysSynLog/syn',
								data: {
									type: type
								},
								success: function (data) {
									if (data.code == 0) {
										layer.msg(data.msg);
									} else {
										layer.msg(data.msg);
									}
								}
							});
						}, function() {
						});
					}
				});
				break;
			}
			case 'event-to-syn-col': {
				layer.confirm('确定要同步吗？', { icon: 3 }, function() {
					layer.msg('处理中', { icon: 16, shade: 0.01 });
					$.ajax({
						type: "POST",
						url: '/api/inter/ysSynLog/synCol',
						data: {},
						success: function (data) {
							if (data.code == 0) {
								layer.msg(data.msg);
							} else {
								layer.msg(data.msg);
							}
						}
					});
				}, function() {
				});
				break;
			}
			case 'event-to-syn-button': {
				layer.confirm('确定要同步吗？', { icon: 3 }, function() {
					layer.msg('处理中', { icon: 16, shade: 0.01 });
					$.ajax({
						type: "POST",
						url: '/api/inter/ysSynLog/synButton',
						data: {},
						success: function (data) {
							if (data.code == 0) {
								layer.msg(data.msg);
							} else {
								layer.msg(data.msg);
							}
						}
					});
				}, function() {
				});
				break;
			}
		}
	},

	$scope.listenMenu10356 = function(event, datas) {
		
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('财务交易类型-新增',"/web/finance/tcwFinancialTransactionType/toAdd",1);
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tcwFinancialTransactionType/export');
				break;
			}
			case 'event-to-edit':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab("财务交易类型 - 编辑","/web/finance/tcwFinancialTransactionType/toEdit?id="+ datas[0].id,1);
				}
				break;
			}
		};
	}

    $scope.listenMenu10359 = function(event, datas) {
		switch(event){
			case 'event-to-add': {
				$scope.showModalLink('/web/sys/toaNotice/toAdd', '新增');
				break;
			}
			case 'event-to-edit': {
				if (datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if (datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/sys/toaNotice/toEdit?id=' + datas[0].id, '编辑');
				}
				break; 
			}
		};
    }
    $scope.listenMenu10360 = function(event, datas) {
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('费用划拨单-新增', '/web/finance/tcwExpenseAllocation/toAdd');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tcwExpenseAllocation/export');
				break;
			}
		};
	}
	$scope.listenMenu10364 = function(event, datas) { // 运营电子发票开票单
		switch(event){
			case 'event-to-import'://主表信息导入
			{
				$scope.showModalLink('/toImport?menuId=' + 10364, '批量导入');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tcwElectronicInvoice/export');
				break;
			}
		};
	}

	$scope.listenMenu10365 = function(event, datas) { // 运营形式发票开票单
		switch(event){
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tcwProformaInvoice/export');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA_DYXS':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwProformaInvoice/exportdyxs',
						data: "bid="+datas[0].bid,
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
				}
				break;
			}
			case 'LAYTABLE_EXPORT_DATA_DYFW':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwProformaInvoice/exportdyfw',
						data: "bid="+datas[0].bid,
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
				}
				break;
			}
		};
	}

	$scope.listenMenu10369 = function(event, datas) {// 预约采购管理
		switch(event){
			case 'event-to-cancel':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					layer.confirm('确定要取消吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						
						$http.post('/api/inter/tcgPurchaseAppointOrderManage/cancel', {}, {params: {bid: datas[0].bid}})
						.success(function (response) {
							layer.msg(response.msg);
							if (response.code == 0) {
								layer.close();
								location.reload();
							}
						});
					}, function() {
					});
				}
				break;
			}
			case 'event-to-export'://导出
			{
				$scope.doExport('/api/inter/tcgPurchaseAppointOrderManage/export');
				break;
			}
		};
	}
	$scope.listenMenu10370 = function(event, datas) {// 预约采购单
		
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab("预约采购单-新增","/web/purchase/tcgPurchaseAppointOrder/toAdd", 1);
				break;
			}
			case 'event-to-export'://导出
			{
				$scope.doExport('/api/inter/tcgPurchaseAppointOrder/export');
				break;
			}
		};
	}
	$scope.listenMenu10371 = function(event, datas) {// 采购预入库
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab("采购预入库 - 新增","/web/purchase/tcgPurchasePreStorage/toAdd", 1);
				break;
			}
			case 'event-to-export'://导出
			{
				$scope.doExport('/api/inter/tcgPurchasePreStorage/export');
				break;
			}
		};
	}
	$scope.listenMenu10373 = function(event, datas) { // 商品组装单
		switch(event){
			// 生成质检上架单
			case 'event-to-up':
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else {
					var bids = '';
					for(var i = 0 ;i < datas.length; i++){
						bids += datas[i].bid + ',';
					}
					layer.confirm('确定要生成质检上架单？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							url: '/api/inter/tccAssemble/batchPass',
							data: {
								bids: bids.substring(0, bids.length - 1)
							},
							type: 'POST',
							async: true,
							success: function(res) {
								layer.msg(res.msg);
								setTimeout(function(){
									location.reload();
								}, 1000);
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {
					});
				}
				break;
			}
			case 'event-to-exception': {
				if (datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if (datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					var w = ($(window).width() * 0.9);
					var h = ($(window).height() - 50);
					var index = layer.open({
						type: 2, area: [w + 'px', h + 'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade: 0.4,
						title: "异常组装",
						content: '/web/storage/tccAssemble/toError?bid=' + datas[0].bid
					});
				}
				break; 
			}
		};
	}

	$scope.listenMenu10376 = function(event, datas) {// 采购入库
		switch(event){
			case 'event-to-export'://导出
			{
				$scope.doExport('/api/inter/tcgPurchaseInStorage/export');
				break;
			}
			case 'event-to-rk'://采购入库
			{
				if(datas.length == 0) {
					return layer.alert('尚未选中数据');
				}
				var choooseDatas = JSON.stringify(datas);
				var infoItems=JSON.parse(choooseDatas);
				if (infoItems.some(item => item.storageStatus == 1)) {
					layer.msg("只允许操作待入库数据,请核实后在操作!");
					return;
				}
				window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
					var listId = [];
					for (var i = 0; i < datas.length; i++) {
						listId.push(datas[i].id)
					}
					layui.layer.msg('处理中', {
						icon: 16,
						shade: 0.01
					});
					$.ajax({
						url: '/api/inter/tcgPurchaseInStorage/updateRk',
						data: {listId:JSON.stringify(listId),chw:data.chw},
						type: 'POST',
						async: false,
						success: function (result) {
							if(result.code=='0'){
								layer.close();
								//刷新列表
								setTimeout(function(){
									location.reload();
								}, 1000);
								//return;
							}else {//失败
								layer.close();
								layer.msg(result.msg, {icon: 2});
							}
						},
						error: function () {
							layer.close();
							layer.msg("采购入库失败，请稍后再试！", {icon: 2});
						}
					});
				};
				layui.YsModal.init({modalKey: 'TCC_LocationRk', colCode: 'aaaa', parentObj: window});
				break;
			}
			case 'event-to-sh'://入库审核
			{
				if(datas.length == 0) {
					return layer.alert('尚未选中数据');
				}
				var choooseDatas = JSON.stringify(datas);
				var infoItems=JSON.parse(choooseDatas);
				if (infoItems.some(item => item.chw == null || item.chw == '')) {
					layer.msg("只允许操作已选择货位的数据,请核实后在操作!");
					return;
				}
				layer.confirm('确定要入库审核吗？', { icon: 3 }, function() {
					layer.msg('处理中', { icon: 16, shade: 0.01 });
					var listId = [];
					for (var i = 0; i < datas.length; i++) {
						listId.push(datas[i].id)
					}
					$.ajax({
						url: '/api/inter/tcgPurchaseInStorage/updateSh',
						data: {listId:JSON.stringify(listId)},
						type: 'POST',
						async: true,
						success: function(res) {
							layer.close();
							location.reload();
							layer.msg(res.msg);
						}, error: function() {
							layer.close();
							layer.msg("入库审核失败，请稍后再试！", { icon: 2 });
						}
					});
				}, function() {
				});
				break;
			}
		};
	}

	$scope.listenMenu10382 = function(event, datas) {//库存管理
		switch(event){
			case 'event-to-export':
			{
				$scope.doExport('/api/inter/tccStockControl/export');
				break;
			}
		};
	}
	$scope.listenMenu10383 = function(event, datas) {//仓库管理
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/storage/tccWarehouse/toAdd', '新增');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tccWarehouse/export');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('仓库管理 - 编辑', '/web/storage/tccWarehouse/toEdit?id=' + datas[0].id, 1);
				}
				break;
			}
		};
	}
	$scope.listenMenu10384 = function(event, datas) {//库区管理
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/storage/tccWarehouseArea/toAdd', '新增');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tccWarehouseArea/export');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('库区管理 - 编辑', '/web/storage/tccWarehouseArea/toEdit?id=' + datas[0].id, 1);
				}
				break;
			}
		};
	},
	$scope.listenMenu10386 = function(event, datas) {//货位管理
		switch(event){
			case 'event-to-add':
			{
				$scope.showModalLink('/web/storage/tccLocation/toAdd', '新增');
				break;
			}
			case 'LAYTABLE_EXPORT_DATA':
			{
				$scope.doExport('/api/inter/tccLocation/export');
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					window.top.add_tab('货位管理 - 编辑', '/web/storage/tccLocation/toEdit?id=' + datas[0].id, 1);
				}
				break;
			}
		};
	}
	$scope.listenMenu10387 = function(event, datas) {// 采购付款单
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab("采购付款单 - 新增","/web/purchase/tcgPurchasePayment/toAdd",1);
				break;
			}
			case 'event-to-export'://导出
			{
				$scope.doExport('/api/inter/tcgPurchasePayment/export');
				break;
			}
			case 'event-to-cgtk'://采购退款
			{
				if(datas.length == 0) {
					return layer.alert('尚未选中数据');
				}else if(datas.length > 1) {
					return layer.alert('只能选中一行数据');
				}
				if (datas.some(item => item.effectStock != 1)) {
					layer.msg("只允许操作已审核数据,请核实后在操作!");
					return;
				}
				var dataGet = datas[0];
				layer.confirm('确定要采购退款所选的单据吗？', { icon: 3 }, function() {
					window.matchValuesAfterModalSelectRadio = function (colCode, data, extraData) {
						layer.msg('处理中', {icon: 16, shade: 0.01});
						$.ajax({
							url: '/api/inter/tcgPurchasePayment/cgtk',
							data: {
								id: dataGet.id,
								capitalClaimSonId:data.capitalClaimSonId
							},
							type: 'POST',
							async: true,
							success: function (res) {
								if (res.code == 0) {
									layer.msg(res.msg);
									setTimeout(function () {
										layer.closeAll();
										location.reload();
									}, 3000);
								} else {
									layer.msg(res.msg);
								}
							}, error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					};
					var par = "purchasePaymentId="+ dataGet.id;//采购付款单id
					layui.YsModal.init({modalKey: 'TCW_CapitalClaimCg', colCode: 'vyhzhmc', parentObj: window,conditionsDefault: [{code: 'claimVgsbm', value:"GS0607"}], pathGridRequest: '/api/inter/tcwCapitalClaim/tcwCapitalClaimCg?'+par});
				});
				break;
			}
		};
	}

	$scope.listenMenu10388 = function(event, datas) {// 发票登记单
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab("发票登记单 - 新增","/web/purchase/tcgInvoiceRegist/toAdd",1);
				break;
			}
			case 'event-to-export'://导出
			{
				$scope.doExport('/api/inter/tcgInvoiceRegist/export');
				break;
			}
		};
	}

	$scope.listenMenu10391 = function(event, datas) {// 亚马逊仓库地址管理
		switch(event){
			case 'event-to-add':
			{
				window.top.add_tab('亚马逊仓库地址管理 - 新增', '/web/logistics/tpAmazonAddress/toAdd',1);
				break;
			}
			case 'event-to-edit'://编辑
			{
				if(datas.length == 0) {
					layer.alert('尚未选中数据');
				} else if(datas.length > 1) {
					layer.alert('只能选中一行数据');
				} else {
					$scope.showModalLink('/web/logistics/tpAmazonAddress/toEdit?id=' + datas[0].id, '编辑');
				}
				break;
			}
			case 'event-to-export'://导出
			{
				$scope.doExport('/api/inter/tpAmazonAddress/export');
				break;
			}
			case 'event-to-print'://亚马逊仓库地址管理材料打印
			{

				break;
			}
		};
	}

}